﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace nMongo
{
    /// <summary>
    /// Marks a class to enable his graveyard control.
    /// </summary>
    [AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = true)]
    public class MongoMortalCollectionAttribute : Attribute
    {
        readonly string _collectionName;

        /// <param name="collectionName">Name of the collection in the MongoDB database.</param>
        public MongoMortalCollectionAttribute(string collectionName)
        {
            this._collectionName = collectionName;
        }

        /// <summary>
        /// Name of the collection in the MongoDB database.
        /// </summary>
        public string CollectionName
        {
            get { return _collectionName; }
        }
    }
}
